home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000133_icon-group-sender _Wed Jun 12 14:13:52 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Wed, 12 Jun 1996 09:00:18 MST
  2. To: icon-group@cs.arizona.edu
  3. Date: 12 Jun 1996 14:13:52 +1000
  4. From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe)
  5. Message-Id: <4plg60$k8e@goanna.cs.rmit.EDU.AU>
  6. Organization: Comp Sci, RMIT, Melbourne, Australia
  7. Sender: icon-group-request@cs.arizona.edu
  8. References: <4pga54$2qt@lectura.CS.Arizona.EDU>, <4piqll$mpm@goanna.cs.rmit.EDU.AU>, <4pjh1a$7ns@lyra.csx.cam.ac.uk>
  9. Subject: Re: m3 should have SWAP(a,b)
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11. Status: O
  12.  
  13. fanf2@thor.cam.ac.uk (Tony Finch) writes:
  14. >BCPL has parallel assignment.
  15.  
  16. Alas, not true.  Quoting a BCPL reference:
  17.     "The multiple assignment, for example
  18.         x, y := E1, E2
  19.      indicates that the separate assignments
  20.         x := E1; y := E2
  21.      will be performed SEQUENTIALLY (*not* simultaneously).
  22.      The order of performing the assignments is undefined."
  23.  
  24. This means that
  25.     x, y := y, x
  26. may have either the effect of
  27.     x := y; y := x            (new x = new y = old y)
  28. or of
  29.     y := x; x := y            (new x = new y = old x)
  30. neither of which is the effect of a true parallel assignment.
  31.  
  32. This caused me enormous trouble when trying to translate a BCPL program to
  33. Algol once, because I kept reading multiple assignments as parallel, but
  34. they weren't.
  35.  
  36. -- 
  37. Fifty years of programming language research, and we end up with C++ ???
  38. Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.
  39.